<div class="header">
    <back-Btn></back-Btn>
    项目报销
</div>
<div class="container finance">
    <div class="list f_sk">
        <div class="list-item icon_more required" ng-click="chooseProject()">
            <div class="item-label">项目名称</div>
            <div class="flow-content">{{ param.projectName }}</div>
        </div>
        <div class="list-item icon_more" ng-click="chooseSk()">
            <div class="item-label">项目收款</div>
            <div class="flow-content">{{ param.gatheringNo }}</div>
        </div>
        <div rela-module taskid="process_id" param="param" rel="XMBX_MODULE"></div>
        <div class="list-item icon_more">
            <div class="item-label">收款人</div>
            <div class="flow-content">
                <input type="text" ng-model="param.receivePerson" />
                <p class="project_name" ng-click="showSearchPicker()"></p>
            </div>
        </div>
        <div class="list-item">
            <div class="item-label">收款人账号</div>
            <div class="flow-content">
                <input type="text" ng-model="param.receiveAccount" />
            </div>
        </div>
        <div class="list-item">
            <div class="item-label">收款人开户行</div>
            <div class="flow-content">
                <input type="text" ng-model="param.receiveBank" />
            </div>
        </div>
        <div class="list-item list-item-textarea">
            <div class="item-label">备注</div>
            <div class="flow-content">
                <textarea cols="30" rows="10" ng-model="param.remark"></textarea>
            </div>
        </div>
        <!-- 自定义字段 -->
        <div user-defined field-map="param.fieldMap" validation="validation" uid="param.uid"
            processid="param.processInstanceId"></div>
        <div class="table-list">
            <div class="info-title">报销明细 <span class="c-blue fr" ng-click="showPicker(-1)">添加</span></div>
            <div class="table-item" ng-repeat="item in param.details">
                <div class="content" ng-class="{cur:$index==curindex}" ng-click="edit($index)"
                    ng-swipe-left="swipe($index,0)" ng-swipe-right="swipe(-1,0)" ng-swipe-left="resetlist(0)">
                    <div class="list-item">
                        <div class="item-label">报销类型:</div>
                        <div class="flow-content">
                            {{item.category}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">开始日期:</div>
                        <div class="flow-content">
                            {{item.startTime|dateFmt}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">结束日期:</div>
                        <div class="flow-content">
                            {{item.endTime|dateFmt}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">单据数量:</div>
                        <div class="flow-content">
                            {{item.ticketQuantity}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">报销金额(元):</div>
                        <div class="flow-content">
                            {{item.amount|NBFmt}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">报销事由:</div>
                        <div class="flow-content">
                            {{item.reason}}
                        </div>
                    </div>
                    <div class="file-upload" file-list file-data="item.attachment"></div>
                </div>
                <div class="delete_icon icon_del" ng-click="deletedItem($index)"></div>
            </div>
        </div>
        <div class="table-list">
            <div class="info-title">借款明细 <span class="c-blue fr" ng-click="chooselend()">添加</span></div>
            <div class="table-item" ng-repeat="item in param.borrows">
                <div class="content" ng-class="{cur:$index==payindex}" ng-click="resetlist(1)"
                    ng-swipe-left="swipe($index,1)" ng-swipe-right="swipe(-1,1)">
                    <div class="list-item">
                        <div class="item-label">编号:</div>
                        <div class="flow-content">
                            {{item.borrowingNo}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">申请人:</div>
                        <div class="flow-content">
                            {{item.borrowingPerson}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">款项用途:</div>
                        <div class="flow-content">
                            {{item.borrowPurpose}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">借款金额:</div>
                        <div class="flow-content">
                            {{item.borrowingAmount}}
                        </div>
                    </div>
                    <div class="list-item required">
                        <div class="item-label">本次冲抵金额:</div>
                        <div class="flow-content">
                            <input type="text" ng-model="item.reimburseAmount" tel-directive />
                        </div>
                    </div>
                </div>
                <div class="delete_icon icon_del" ng-click="deletedBorrowItem($index)"></div>
            </div>
        </div>
        <!-- 附件 -->
        <div class="file-upload" file-upload file-data="param.attachment"></div>
        <!-- 审查日志 -->
        <div log-list taskid="process_id"></div>
    </div>
</div>
<div class="list tablestyle pickceritem" ng-show="showCerPicker">
    <div class="list-item">
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">报销类型</div>
            <div class="col-7-12">
                <select ng-model="picker.category" ng-options="item.value as item.key for item in projectBXTypes">
                    <option value="">选择报销类型</option>
                </select>
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">开始日期</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.startTime" date-directive />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">结束日期</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.endTime" date-directive />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">单据数量</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.ticketQuantity" tel-directive positive />
            </div>
        </div>
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">报销金额(元)</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.amount" tel-directive />
            </div>
        </div>
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">报销事由</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.reason" />
            </div>
        </div>
        <div class="file-upload" file-upload file-data="picker.attachment" maxnum="1"></div>
    </div>
    <div class="pickceritem-btn flex tc">
        <div class="cancel" ng-click="closePicker()">取消</div>
        <div class="confirm" ng-click="addItem()">确定</div>
    </div>
</div>

<!-- 删除流程 -->
<div delete-flow uid="param.uid" id="{{ param.processInstanceId }}" submit="submit" validate="validate"></div>
<div search-input show-search-input="showSearchInput" apiurl="apiurl" handle-search="handleSearch" param="searchparam"
    title="searchtitle"></div>